package com.zhuxulin.nokia;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.List;

import com.zhuxulin.nokia.bean.User;

public class Infomation implements CommandListener {
	private Display dis = null;
	private List msgList = null;
	private Displayable parent;
//	private String loginName;
//	private String passwordP;
	private String msg;
	private User user=null;
	public Infomation(Display dis, Displayable parent, User user, String msg) {
		this.dis = dis;
		this.parent = parent;
//		this.loginName = loginName;
//		this.passwordP = password;
		this.user=user;
		this.msg = msg;
		init();
	}

	private void init() {
		if (this.dis != null) {
			this.msgList = new List("Information", 3,
					new String[] { this.msg }, null);
			this.msgList.setSelectCommand(List.SELECT_COMMAND);
			this.msgList.setCommandListener(this);
			this.dis.setCurrent(this.msgList);
		}
	}

	public void commandAction(Command cmnd, Displayable dsplbl) {
		if (cmnd == List.SELECT_COMMAND)
			new BuyLottery(this.dis, this.parent, user, "");
	}
}